﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Client.ShopServiceReference;
using ServerApp;
using Server;

namespace Client
{
    public interface IOrdersModel
    {
        /// <summary>
        /// Gets the list of the orders views
        /// </summary>        
        /// <param name="page">Number of the page</param>        
        /// <param name="filter">Dictionary<OrderFilter.value,object></param>
        /// <param name="numberOnThePage">Number of the orders on the one page</param>
        /// <returns>list of the orderView</returns> 
        List<OrderView> GetOrders(Dictionary<OrderFilter, object>filter, int page, int numberOfOrders);


        /// <summary>
        /// Reserves the order (changes its status)
        /// </summary>
        /// <param name="orderId">order id</param>
        /// <param name="executorId">executor id</param>
        /// <returns>new OrderView value</returns>
        OrderFull GetOrder(long id, string language);


        /// <summary>
        /// Reserves the order (changes its status)
        /// </summary>
        /// <param name="orderId">order id</param>
        /// <param name="executorId">executor id</param>
        /// <returns>new OrderView value</returns>
        OrderFull ReserveOrder(long orderId, long executorId);


        /// <summary>
        /// Closes the order 
        /// </summary>
        /// <param name="orderId">order id</param>
        /// <returns>new OrderView value</returns>
        OrderFull CloseOrder(long orderId);


        /// <summary>
        /// Cancel the order and unreserves all products of this order
        /// </summary>
        /// <param name="orderId">Id of the order</param>
        /// <returns>bool value</returns>
        bool CancelOrder(long orderId);
    }
}
